<template>  
    <div class='left-type'>
        <div style='margin-top:80px'></div>
        <div @click='changeType(val.typeId)' v-for="(val,index) in info" :key='index' class='left-li'>{{val.typeName}}</div>
    </div>
</template>
<script>
import {AJAX,_layer,GOLEIXIN,LEIXIN} from '@/comm.js';

export default {
  data(){
    return ({
        info:[],
    });
  },
  created(){
    $.post(LEIXIN,{

    },(data)=>{ 
        console.log(data);
        if(data.state){
           this.info=data.data;
        }else{
            _layer(data.message);
        }
    });
  },
  methods:{
    changeType(val){
        this.$router.push({path:'/leiList',query:{id:val}});
        this.$emit('changeType',val);
        
    }
  },
}
</script>
<style scoped>
    .left-type{
        position:fixed;
        top:0;
        width: 63%;
        bottom:0;
        z-index:2;
        background: #183242;
    }
    .left-type .left-li{
        padding:15px 0;
        font-size:18px;
        text-align: center;
        color:white;
    }
</style>
